<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ include file="/WEB-INF/jsp/include.jsp"%>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />


<script>
 	function deleteFunction(frm){
 		var isDel = confirm("Bạn có muốn xóa giỏ hàng này?");
 		if (isDel) {
 			return true;
 		} else {
 			return false;
 		}
 	}
</script>
<div id="content-block">
	<div id="breadcrumb">
		<div class="breadcrumb">
			<a href="home.html">Trang chủ</a> »
			<c:if test = "${subNamecat == 'Rau, củ, quả'} && ${subNamecat == 'Hải sản'}">
					<a href="#">${subNamecat}</a> 	»				
			</c:if>
			<c:if test = "${subNamecat == 'Hải sản'}">
					<a href="#">${subNamecat}</a> 	»				
			</c:if>  
			
			<a href="listproduct.html?id=${catid}">${nameCat}</a>
		</div>
	</div>

	<div id="page-title">
	Danh sách giỏ hàng</div>
<div class="view view-uc-products-frontpage view-id-uc_products_frontpage view-display-id-block_1 view-dom-id-11">
				<div class="view-content">		
					<table class="spchonmua" style="width: 565px; float: left; border: 1px double #E4E4E4; height: 150px;">
	<tbody>
    	<tr>
			<td align="center" style="width: 5%; border: 1px double #E4E4E4" class="cssTitle"><a
				class="text_vangto">STT</a></td>
			<td align="center" style=" border: 1px double #E4E4E4" class="cssTitle" colspan="2"><a
				class="text_vangto">Mã đơn hàng</a></td>
			<td align="center" style=" border: 1px double #E4E4E4" class="cssTitle" colspan="2"><a
				class="text_vangto">Tên đăng nhập</a></td>
			<td align="center" width="17%" style=" border: 1px double #E4E4E4" class="cssTitle"><a
				class="text_vangto">Ngày lập</a></td>
			<td align="center" width="20%" style=" border: 1px double #E4E4E4" class="cssTitle"><a
				class="text_vangto">Tổng tiền(VND)</a></td>
			<td align="center" width="5%" style=" border: 1px double #E4E4E4" class="cssTitle"><a
				class="text_vangto">Xóa đơn hàng</a></td>
			<td align="center" width="15%" style=" border: 1px double #E4E4E4" class="cssTitle" colspan="2"><a
				class="text_vangto">Xác nhận thanh toán</a></td>
		</tr>
		<c:set var="stt" value="0"/>
		<c:forEach var="order" items="${orders}">
		<tr style="background-color: white;">
			<td align="center" style=" border: 1px double #E4E4E4" ><a class="text_tin"><c:out value="${stt+1}"/></a></td>
			<td align="center" colspan="2" style=" border: 1px double #E4E4E4"><a href="detailorderadmin.html?code=${order.code}" class="text_tin">${order.code}</a></td>
			<td align="center" colspan="2" style=" border: 1px double #E4E4E4"><a href="detailorderadmin.html?code=${order.code}" class="text_tin">${order.customerName}</a></td>
			<td align="center" style=" border: 1px double #E4E4E4"><a name="created_name" class="text_tin">${order.created}</a></td>
			<td align="right" style=" border: 1px double #E4E4E4"><a class="text_tin" name = "uc_price_name">${order.totalPrice}</a></td>
			<form name="frmDel${order.key}" action='delOrder.do' method="post"> 
				<input type="hidden" name="key" value="${order.key}" /> 
				<td align="center" colspan="2" style=" border: 1px double #E4E4E4"><button onclick='return deleteFunction("frmDel${order.key}");'>-</button> </td>
			</form>
			<td align="center" colspan="2" style=" border: 1px double #E4E4E4"><a
				href="exeorder.html?id=${order.code}">Xác nhận</a></td>
		</tr>
		<c:set var="stt" value="${stt+1}"/>
		</c:forEach>
	</tbody>
</table>


</div>
</div>
				
</div>

<script type="text/javascript" src="./js/date-format.js"></script>
